<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>3d</title>
    <style>
        body{
            height: 3000px;
        }
        .container{
            width: 400px;
            height: 400px;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
            outline: 1px solid red;
            background-color: rgb(255, 236, 202);
            display: flex;
            justify-content: center;
            align-items: center;
            transition: 2s;
            perspective:500px;
        }
        .card{
            width: 200px;
            height: 200px;
            background-color: rgb(157, 245, 196);
            outline: 1px solid red;
            z-index: 10;
            transition: 0.3s;
            
        }
        .c1{
            transform-style: preserve-3d;
           
        }
        .c1 .card{
            transform: rotateX(45deg) rotateY(45deg);
        }
        .container:hover{
            transform: rotateX(60deg) rotateY(30deg);
        }

    </style>
</head>
<body>
    <div class="container c1">
        <div class="card">
            123
        </div>
    </div>
    <!-- <div class="container c2">

    </div> -->
</body>
</html>